package org.example.d6_enum;
//拓展：抽象枚举
public enum B {
    X(){
        @Override
        public void go() {

        }
    },Y("张三"){
        @Override
        public void go() {
       System.out.println(getName() + "在干嘛");
        }
    };


    public String name;

    B(String name) {
        this.name = name;
    }

    B(){

    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public abstract  void  go();
}
